package com.quick.repository;

import com.quick.domain.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.awt.print.Book;

/**
 * 功能描述 TODO
 *
 * @Created Time 2017/9/1
 * @Edited Time 2017/9/1
 * @Created by wangxin43
 */
@Repository("userRepository")
public interface UserRepository extends JpaRepository<User,Integer>{
    User findByUsername(String userName);

    @Query("from User b where b.username=:userName")
    Book findUser(@Param("userName") String userName);
}
